package com.sdkj.dspservice.modules.report.dao;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.sdkj.dspservice.common.base.dao.CrudDao;
import com.sdkj.dspservice.modules.report.entity.Report;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 报表dao
 * @author tm
 */
public interface ReportDao extends CrudDao<Report> {
    /**
     * 关联查询
     * @param wrapper
     * @return
     */
    @Select({"select a.*,cu.name as \"createByUser.name\" from report_report a " +
            "left join sys_user cu on cu.id = a.create_by " +
            "${ew.customSqlSegment}"})
    List<Report> listLink(@Param(Constants.WRAPPER) Wrapper<Report> wrapper);
}